<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE html>
<html lang="zh-cmn-Hans">
<head>
<meta charset="UTF-8">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<base herf="<%=basePath%>">
<link href="<%=basePath%>static2/assets/css/bootstrap.min.css"
	rel="stylesheet" />
<link rel="stylesheet" href="<%=basePath%>static2/css/style.css" />
<link href="<%=basePath%>static2/assets/css/codemirror.css"
	rel="stylesheet">
<link rel="stylesheet"
	href="<%=basePath%>static2/assets/css/ace.min.css" />
<link rel="stylesheet"
	href="<%=basePath%>static2/assets/css/font-awesome.min.css" />
<link rel="stylesheet" href="<%=basePath%>layui/css/layui.css"
	media="all">
<script src="<%=basePath%>static2/assets/js/jquery.min.js"></script>

<script type="text/javascript">
			window.jQuery || document.write("<script src='<%=basePath%>static2/assets/js/jquery-2.0.3.min.js'>"+"<"+"/script>");
		</script>

<script type="text/javascript">
			if("ontouchend" in document) document.write("<script src='<%=basePath%>static2/assets/js/jquery.mobile.custom.min.js'>"
						+ "<"+"/script>");
</script>
<script src="<%=basePath%>static2/assets/js/bootstrap.min.js"></script>
<script src="<%=basePath%>static2/assets/js/typeahead-bs2.min.js"></script>
<!-- page specific plugin scripts -->
<script src="<%=basePath%>static2/assets/js/jquery.dataTables.min.js"></script>
<script
	src="<%=basePath%>static2/assets/js/jquery.dataTables.bootstrap.js"></script>
<script type="text/javascript" src="<%=basePath%>static2/js/H-ui.js"></script>
<script type="text/javascript"
	src="<%=basePath%>static2/js/H-ui.admin.js"></script>
<script src="<%=basePath%>static2/assets/layer/layer.js"
	type="text/javascript"></script>
<script src="<%=basePath%>static2/assets/laydate/laydate.js"
	type="text/javascript"></script>
<script src="<%=basePath%>layui/layui.js" charset="utf-8"></script>
<script type="text/javascript">
	$(document).ready(function() {

	});
	function member_del(obj, id) {
		//alert("zhixingledianji");
		layer.confirm('确认要删除吗？', function(index) {
			$.ajax({
				type : "POST",
				url : "../../moyissm/manager/deleteOrder",
				data : {
					orderid : id
				},
				dataType : "json",
				success : function(data) {
				}
			});
			$(obj).parents("tr").remove();
			layer.msg('已删除!', {
				icon : 1,
				time : 1000
			});
		});
	}

	function changeStatus(obj, orderId, oldStatus, newStatus) {
		layer.confirm('确认发货', function(index) {
			$.ajax({
				type : "GET",
				url : "../web/reorderStatus",
				data : {
					orderId : orderId,
					oldStatus : oldStatus,
					newStatus : newStatus
				},
				//dataType:"json",
				success : function(data) {
				}
			});
			$(obj).remove();
			layer.msg('发货成功!', {
				icon : 1,
				time : 1000
			});
		});
	}
</script>
<title>用户列表</title>
</head>

<body>
	<div class="page-content clearfix">
		<div id="Member_Ratings">
			<div class="d_Confirm_Order_style">
				<div class="search_style">
					<form action="<%=basePath%>manager/dimOrderList"
						class="input-group">
						<ul class="search_content clearfix">
							<li><label class="l_f">订单用户id</label><input
								name="order_dimSearch" type="text" class="text_add"
								placeholder="输入订单用户id" style="width: 400px" /></li>
							<li style="width: 90px;"><button type="submit"
									class="btn_search">
									<i class="icon-search"></i>查询
								</button></li>
						</ul>
					</form>
				</div>
<hr class="layui-bg-blue">
				<div align="center" style="text-align: center">

					<a href="<%=basePath%>web/getordersByStatus?status=0"
						class="btn_search"> <i class="icon-search"></i>等待付款
					</a> <a href="<%=basePath%>web/getordersByStatus?status=1"
						class="btn_search"> <i class="icon-search"></i>等待发货
					</a> <a href="<%=basePath%>web/getordersByStatus?status=2"
						class="btn_search"> <i class="icon-search"></i>运输中
					</a> <a href="<%=basePath%>web/getordersByStatus?status=3"
						class="btn_search"> <i class="icon-search"></i>已签收
					</a>
				</div>
				<hr class="layui-bg-blue">
				<div>
					<div class="layui-form">
						<div class="layui-form-item">
							<div class="layui-inline">
								<label class="layui-form-label">开始</label>
								<div class="layui-input-inline">
									<input type="text" class="layui-input" name="dateBegin"
										id="test1" placeholder="yyyy-MM-dd">
								</div>
							</div>
							<button type="button" class="layui-btn layui-btn-warm"
								id="selectByTime">查询</button>
						</div>
					</div>

					<div class="layui-inline">
						<label class="layui-form-label">结束</label>
						<div class="layui-input-inline">
							<input type="text" class="layui-input" name="dateEnd" id="test1"
								placeholder="yyyy-MM-dd">
						</div>
					</div>
					<hr class="layui-bg-blue">
					<div class="table_menu_list">
						<table class="table table-striped table-bordered table-hover"
							id="sample-table">
							<thead>
								<tr>
									<th width="25"><label><input type="checkbox"
											class="ace"><span class="lbl"></span></label></th>
									<th width="80">ID</th>
									<th width="100">用户手机号</th>
									<th width="120">用户id</th>
									<th width="150">收件地址</th>
									<th width="250">实付款</th>
									<th width="250">时间</th>
									<th width="250">收件人</th>
									<th width="250">状态</th>
									<th width="250">操作</th>
								</tr>
							</thead>
							<tbody>
								<c:forEach items="${statusOrderList}" var="order">

									<div>
										<tr>
											<td><label><input type="checkbox" class="ace"><span
													class="lbl"></span></label></td>
											<td>${order.orderids }</td>
											<td><u style="cursor: pointer" class="text-primary"
												onclick="member_show('张三','member-show.html','10001','500','400')">${order.phone }</u></td>
											<td>${order.userid }</td>
											<td>${order.target }</td>
											<td>${order.shifukuan }</td>
											<td><fmt:formatDate value="${order.time }"
													pattern="yyyy-MM-dd HH-mm-ss" /></td>
											<td>${order.shoujianrenname }</td>
											<td>${order.zhuangtai }</td>
											<td class="td-manage"><span title="发货"
												onclick="changeStatus(this,'${order.orderids}',1,2)"
												class="btn btn-xs btn-info"><i
													class="icon-edit bigger-120"></i></span><a title="删除"
												href="javascript:;"
												onclick="member_del(this,'${order.orderids}')"
												class="btn btn-xs btn-warning"><i
													class="icon-trash  bigger-120"></i></a></td>
										</tr>
									</div>
								</c:forEach>
							</tbody>
						</table>
					</div>
				</div>
			</div>
		</div>
		<script>
			layui.use('laydate', function() {
				var laydate = layui.laydate;

				//常规用法
				laydate.render({
					elem : '#test1'
				});

				//国际版
				laydate.render({
					elem : '#test1-1',
					lang : 'en'
				});

				//年选择器
				laydate.render({
					elem : '#test2',
					type : 'year'
				});

				//年月选择器
				laydate.render({
					elem : '#test3',
					type : 'month'
				});

				//时间选择器
				laydate.render({
					elem : '#test4',
					type : 'time'
				});

				//日期时间选择器
				laydate.render({
					elem : '#test5',
					type : 'datetime'
				});

				//日期范围
				laydate.render({
					elem : '#test6',
					range : true
				});

				//年范围
				laydate.render({
					elem : '#test7',
					type : 'year',
					range : true
				});

				//年月范围
				laydate.render({
					elem : '#test8',
					type : 'month',
					range : true
				});

				//时间范围
				laydate.render({
					elem : '#test9',
					type : 'time',
					range : true
				});

				//日期时间范围
				laydate.render({
					elem : '#test10',
					type : 'datetime',
					range : true
				});

				//自定义格式
				laydate.render({
					elem : '#test11',
					format : 'yyyy年MM月dd日'
				});
				laydate.render({
					elem : '#test12',
					format : 'dd/MM/yyyy'
				});
				laydate.render({
					elem : '#test13',
					format : 'yyyyMMdd'
				});
				laydate.render({
					elem : '#test14',
					type : 'time',
					format : 'H点m分'
				});
				laydate.render({
					elem : '#test15',
					type : 'month',
					range : '~',
					format : 'yyyy-MM'
				});
				laydate.render({
					elem : '#test16',
					type : 'datetime',
					range : '到',
					format : 'yyyy年M月d日H时m分s秒'
				});

				//开启公历节日
				laydate.render({
					elem : '#test17',
					calendar : true
				});

				//自定义重要日
				laydate.render({
					elem : '#test18',
					mark : {
						'0-10-14' : '生日',
						'0-12-31' : '跨年' //每年的日期
						,
						'0-0-10' : '工资' //每月某天
						,
						'0-0-15' : '月中',
						'2017-8-15' : '' //如果为空字符，则默认显示数字+徽章
						,
						'2099-10-14' : '呵呵'
					},
					done : function(value, date) {
						if (date.year === 2017 && date.month === 8
								&& date.date === 15) { //点击2017年8月15日，弹出提示语
							layer.msg('这一天是：中国人民抗日战争胜利72周年');
						}
					}
				});

				//限定可选日期
				var ins22 = laydate.render({
					elem : '#test-limit1',
					min : '2016-10-14',
					max : '2080-10-14',
					ready : function() {
						ins22.hint('日期可选值设定在 <br> 2016-10-14 到 2080-10-14');
					}
				});

				//前后若干天可选，这里以7天为例
				laydate.render({
					elem : '#test-limit2',
					min : -7,
					max : 7
				});

				//限定可选时间
				laydate.render({
					elem : '#test-limit3',
					type : 'time',
					min : '09:30:00',
					max : '17:30:00',
					btns : [ 'clear', 'confirm' ]
				});

				//同时绑定多个
				lay('.test-item').each(function() {
					laydate.render({
						elem : this,
						trigger : 'click'
					});
				});

				//初始赋值
				laydate.render({
					elem : '#test19',
					value : '1989-10-14',
					isInitValue : true
				});

				//选中后的回调
				laydate.render({
					elem : '#test20',
					done : function(value, date) {
						layer.alert('你选择的日期是：' + value + '<br>获得的对象是'
								+ JSON.stringify(date));
					}
				});

				//日期切换的回调
				laydate.render({
					elem : '#test21',
					change : function(value, date) {
						layer.msg('你选择的日期是：' + value + '<br><br>获得的对象是'
								+ JSON.stringify(date));
					}
				});
				//不出现底部栏
				laydate.render({
					elem : '#test22',
					showBottom : false
				});

				//只出现确定按钮
				laydate.render({
					elem : '#test23',
					btns : [ 'confirm' ]
				});

				//自定义事件
				laydate.render({
					elem : '#test24',
					trigger : 'mousedown'
				});

				//点我触发
				laydate.render({
					elem : '#test25',
					eventElem : '#test25-1',
					trigger : 'click'
				});

				//双击我触发
				lay('#test26-1').on('dblclick', function() {
					laydate.render({
						elem : '#test26',
						show : true,
						closeStop : '#test26-1'
					});
				});

				//日期只读
				laydate.render({
					elem : '#test27',
					trigger : 'click'
				});

				//非input元素
				laydate.render({
					elem : '#test28'
				});

				//墨绿主题
				laydate.render({
					elem : '#test29',
					theme : 'molv'
				});

				//自定义颜色
				laydate.render({
					elem : '#test30',
					theme : '#393D49'
				});

				//格子主题
				laydate.render({
					elem : '#test31',
					theme : 'grid'
				});

				//直接嵌套显示
				laydate.render({
					elem : '#test-n1',
					position : 'static'
				});
				laydate.render({
					elem : '#test-n2',
					position : 'static',
					lang : 'en'
				});
				laydate.render({
					elem : '#test-n3',
					type : 'month',
					position : 'static'
				});
				laydate.render({
					elem : '#test-n4',
					type : 'time',
					position : 'static'
				});
			});
		</script>
</body>
</html>
